package com.yeyks.hotel.dal.domain;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 酒店房费提现订单表
 *
 * @author shuai
 * @date 2019-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="HotelWithdrawalOrder对象", description="酒店房费提现订单表")
public class HotelWithdrawalOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "提现订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "酒店ID(3.4.vip废弃)")
    @TableField("hotel_id")
    private Integer hotelId;

    @ApiModelProperty(value = "账户id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "账户类型(对应accountInfo表中的type)")
    @TableField("account_type")
    private Integer accountType;

    @ApiModelProperty(value = "订单类型：0：营业提现   1：床垫分成提现，2：vip佣金提现，3：小vip提现")
    @TableField("order_type")
    private Integer orderType;

    @ApiModelProperty(value = "状态，1申请结算中，2审核通过，3转账中，4打款成功，5打款失败，6已拒绝")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "提现人电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "提现金额")
    @TableField("amount")
    private Integer amount;

    @ApiModelProperty(value = "删除标记：0；未删除  1：已删除")
    @TableField("delete_flag")
    private Integer deleteFlag;

    @ApiModelProperty(value = "提现酒店账户信息json")
    @TableField("bank_info")
    private String bankInfo;

    @ApiModelProperty(value = "审核人ID")
    @TableField("audit_id")
    private Integer auditId;

    @ApiModelProperty(value = "操作人ID")
    @TableField("operator_id")
    private Integer operatorId;

    @ApiModelProperty(value = "下单时间")
    @TableField("gmt_create")
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField("gmt_modified")
    private Date gmtModified;

    @ApiModelProperty(value = "审核时间")
    @TableField("audit_time")
    private Date auditTime;

    @ApiModelProperty(value = "打款时间")
    @TableField("pay_time")
    private Date payTime;


    public static final String ID = "id";

    public static final String ORDER_NO = "order_no";

    public static final String HOTEL_ID = "hotel_id";

    public static final String ACCOUNT_ID = "account_id";

    public static final String ACCOUNT_TYPE = "account_type";

    public static final String ORDER_TYPE = "order_type";

    public static final String STATUS = "status";

    public static final String PHONE = "phone";

    public static final String REMARK = "remark";

    public static final String AMOUNT = "amount";

    public static final String DELETE_FLAG = "delete_flag";

    public static final String BANK_INFO = "bank_info";

    public static final String AUDIT_ID = "audit_id";

    public static final String OPERATOR_ID = "operator_id";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFIED = "gmt_modified";

    public static final String AUDIT_TIME = "audit_time";

    public static final String PAY_TIME = "pay_time";

    public enum Status {
        /** 状态*/
        WAIT(1, "申请结算中"),
        PASS(2, "审核通过"),
        TRANSFER(3, "转账中"),
        SUCCESS(4, "打款成功"),
        FAIL(5, "打款失败"),
        REFUND(6, "已拒绝");
        int value;
        String desc;

        Status(int value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }

        public static String getDesc(int value) {
            for (Status status : values()) {
                if (status.value() == value) {
                    return status.desc();
                }
            }
            return null;
        }
    }
    public enum OrderType {
        /** 状态*/
        ORDER(0, "营业提现"),
        MATTRESS(1, "床垫分成提现"),
        VIP(2, "vip佣金提现"),
        MINI_VIP(3, "小vip提现");
        int value;
        String desc;

        OrderType(int value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }
    }

    public enum Remark {
        APPLICATION(1, "发起提现申请");
        int value;
        String desc;

        Remark(int value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String desc() {
            return this.desc;
        }
    }

}
